/**
 * @author Administrator
 * @version V1.0
 * @ProjectName:IntelliJ IDEA
 * @PackageName: PACKAGE_NAME
 * @ClassName: Truck
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2019/10/10 15:37
 * @Copyright 金斗版板所有
 */
public class Truck extends Car{
   private int payload;
    public  Truck(){

    }

    public Truck(int payload,int loader,int wheels, int weight) {
        super( loader, wheels,  weight);
        this.setPayload(payload);
    }

    public int getPayload() {
        return payload;
    }

    public void setPayload(int payload) {
        this.payload = payload;
    }
    public void work(){
        System.out.println(this.getWheels()+"个轮子的货车，能拉"+this.getLoader()+"个人和"+
                this.getPayload()+"吨货物，总重"+this.getWeight()+"吨");
    }
}
